{-# OPTIONS_GHC -XDeriveDataTypeable #-}
module WS.XI.CommunicationPartyServiceVi where
import Data.Typeable
import Data.Time.LocalTime

import WS.Runtime.Xmlable
import WS.Runtime.Main

import qualified WS.XI.Com.Sap.Aii.Ibdir.Server.Api.Types as S0

nss :: [(String, String)]
nss = [("tns","urn:CommunicationPartyServiceVi"),("s0","urn:com.sap.aii.ibdir.server.api.types")]
ws :: String
ws = "CommunicationPartyService"
-- operations

change :: WsParams -> Change__ -> IO ChangeResponse__
change = runService ws nss "tns:change"
check :: WsParams -> Check__ -> IO CheckResponse__
check = runService ws nss "tns:check"
create :: WsParams -> Create__ -> IO CreateResponse__
create = runService ws nss "tns:create"
delete :: WsParams -> Delete__ -> IO DeleteResponse__
delete = runService ws nss "tns:delete"
openForEdit :: WsParams -> OpenForEdit__ -> IO OpenForEditResponse__
openForEdit = runService ws nss "tns:openForEdit"
query :: WsParams -> Query__ -> IO QueryResponse__
query = runService ws nss "tns:query"
read :: WsParams -> Read__ -> IO ReadResponse__
read = runService ws nss "tns:read"
revert :: WsParams -> Revert__ -> IO RevertResponse__
revert = runService ws nss "tns:revert"


-- types definition

data Change__ = Change__ {
    partyChangeRequestChange :: Maybe S0.PartyCreateChangeIn__
} deriving (Typeable, Eq) 

data ChangeResponse__ = ChangeResponse__ {
    responseChangeResponse :: Maybe S0.ConfigurationObjectModifyOut__
} deriving (Typeable, Eq) 

data Check__ = Check__ {
    partyCheckRequestCheck :: Maybe S0.PartyIdentifierCollection__
} deriving (Typeable, Eq) 

data CheckResponse__ = CheckResponse__ {
    responseCheckResponse :: Maybe S0.LogMessageCollection__
} deriving (Typeable, Eq) 

data Create__ = Create__ {
    partyCreateRequestCreate :: Maybe S0.PartyCreateChangeIn__
} deriving (Typeable, Eq) 

data CreateResponse__ = CreateResponse__ {
    responseCreateResponse :: Maybe S0.ConfigurationObjectModifyOut__
} deriving (Typeable, Eq) 

data Delete__ = Delete__ {
    partyDeleteRequestDelete :: Maybe S0.PartyDeleteOpenForEditIn__
} deriving (Typeable, Eq) 

data DeleteResponse__ = DeleteResponse__ {
    responseDeleteResponse :: Maybe S0.ConfigurationObjectModifyOut__
} deriving (Typeable, Eq) 

data OpenForEdit__ = OpenForEdit__ {
    partyOpenForEditRequestOpenForEdit :: Maybe S0.PartyDeleteOpenForEditIn__
} deriving (Typeable, Eq) 

data OpenForEditResponse__ = OpenForEditResponse__ {
    responseOpenForEditResponse :: Maybe S0.PartyOpenForEditOut__
} deriving (Typeable, Eq) 

data Query__ = Query__ {
    partyQueryRequestQuery :: Maybe S0.PartyQueryIn__
} deriving (Typeable, Eq) 

data QueryResponse__ = QueryResponse__ {
    responseQueryResponse :: Maybe S0.PartyQueryOut__
} deriving (Typeable, Eq) 

data Read__ = Read__ {
    partyReadRequestRead :: Maybe S0.PartyReadIn__
} deriving (Typeable, Eq) 

data ReadResponse__ = ReadResponse__ {
    responseReadResponse :: Maybe S0.PartyReadOut__
} deriving (Typeable, Eq) 

data Revert__ = Revert__ {
    partyRevertRequestRevert :: Maybe S0.PartyIdentifierCollection__
} deriving (Typeable, Eq) 

data RevertResponse__ = RevertResponse__ {
    responseRevertResponse :: Maybe S0.LogMessageCollection__
} deriving (Typeable, Eq) 



-- instances


instance Xmlable Change__ where
	toContent x = [makeToContent ["tns:PartyChangeRequest"] [toContent.partyChangeRequestChange] x]
	fromContent cs = Change__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyChangeRequest"] cs

instance Xmlable ChangeResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseChangeResponse] x]
	fromContent cs = ChangeResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Check__ where
	toContent x = [makeToContent ["tns:PartyCheckRequest"] [toContent.partyCheckRequestCheck] x]
	fromContent cs = Check__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyCheckRequest"] cs

instance Xmlable CheckResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseCheckResponse] x]
	fromContent cs = CheckResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Create__ where
	toContent x = [makeToContent ["tns:PartyCreateRequest"] [toContent.partyCreateRequestCreate] x]
	fromContent cs = Create__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyCreateRequest"] cs

instance Xmlable CreateResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseCreateResponse] x]
	fromContent cs = CreateResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Delete__ where
	toContent x = [makeToContent ["tns:PartyDeleteRequest"] [toContent.partyDeleteRequestDelete] x]
	fromContent cs = Delete__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyDeleteRequest"] cs

instance Xmlable DeleteResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseDeleteResponse] x]
	fromContent cs = DeleteResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable OpenForEdit__ where
	toContent x = [makeToContent ["tns:PartyOpenForEditRequest"] [toContent.partyOpenForEditRequestOpenForEdit] x]
	fromContent cs = OpenForEdit__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyOpenForEditRequest"] cs

instance Xmlable OpenForEditResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseOpenForEditResponse] x]
	fromContent cs = OpenForEditResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Query__ where
	toContent x = [makeToContent ["tns:PartyQueryRequest"] [toContent.partyQueryRequestQuery] x]
	fromContent cs = Query__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyQueryRequest"] cs

instance Xmlable QueryResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseQueryResponse] x]
	fromContent cs = QueryResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Read__ where
	toContent x = [makeToContent ["tns:PartyReadRequest"] [toContent.partyReadRequestRead] x]
	fromContent cs = Read__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyReadRequest"] cs

instance Xmlable ReadResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseReadResponse] x]
	fromContent cs = ReadResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Revert__ where
	toContent x = [makeToContent ["tns:PartyRevertRequest"] [toContent.partyRevertRequestRevert] x]
	fromContent cs = Revert__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:PartyRevertRequest"] cs

instance Xmlable RevertResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseRevertResponse] x]
	fromContent cs = RevertResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

